﻿/*****************************************************************
 * MPAPI - Message Passing API
 * A framework for writing parallel and distributed applications
 * 
 * Author   : Frank Thomsen
 * Web      : http://sector0.dk
 * Contact  : mpapi@sector0.dk
 * License  : New BSD licence
 * 
 * Copyright (c) 2012, Frank Thomsen
 * 
 * Feel free to contact me with bugs and ideas.
 *****************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace MPAPI.NodeHosting
{
	/// <summary>
	/// The Node host as seen from the registration server.
	/// </summary>
	public interface IRegisteredNodeHost
	{
		/// <summary>
		/// Called when a new host has registered with the registration server.
		/// </summary>
		/// <param name="hostId"></param>
		void HostRegistered(IPEndPoint hostEndPoint);

		/// <summary>
		/// Called when a host unregisters.
		/// </summary>
		/// <param name="hostId"></param>
		void HostUnregistered(ushort hostId);

		/// <summary>
		/// Called by the registration server when a node host has registered. The
		/// registration server is responsible for assigning host ids.
		/// </summary>
		/// <param name="hostId"></param>
		void SetId(ushort hostId);
	}
}
